<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" type="text/css" href="<%=path %>/static/css/css.css?1" />
<link rel="stylesheet" type="text/css" href="<%=path %>/static/jquery-ui/jquery-ui.min.css" />
<script type="text/javascript" src="<%=path %>/static/js/json2.js"></script>
<script type="text/javascript" src="<%=path %>/static/js/jquery.js"></script>
<script type="text/javascript" src="<%=path %>/static/jquery-ui/jquery-ui.min.js"></script>
<script type="text/javascript" src="<%=path %>/static/layer/layer.js"></script>
<script type="text/javascript" src="<%=path %>/static/utf8-jsp/ueditor.config.js"></script>
<script type="text/javascript" src="<%=path %>/static/utf8-jsp/ueditor.all.js"></script>
<script type="text/javascript" src="<%=path %>/static/js/gridview.js?v=1"></script>
<script type="text/javascript" src="<%=path %>/static/js/formview.js?v=1"></script>
<script type="text/javascript" src="<%=path %>/static/js/tool.js"></script>
<script type="text/javascript" src="<%=path %>/static/js/validate.js"></script>

<SCRIPT type="text/javascript">
    <!--
    genDicJs(['011']);
    var formSetting = {
    		po:'QhNoviceTask',
    		title:"新手任务编辑",
    		formid:"formedit",
    		hiddens:["id","createUser","createDateTime","modifyUser","modifyDateTime","state"],
    	fields:[
    	     [
    	        {tdwidth:100,title:"排序",type:"text",name:"sort",width:150,datatype:"Number",msg:"请输入格式正确的排序！"},
				{title:"类别",type:"select",dic:"011",name:"type",width:"154",datatype:"Require",msg:"请选择类别！"}
    		 ],
             [
                {title:"标题",type:"text",name:"name",width:826,datatype:"Require",msg:"请输入标题！",colspan:3}
             ],
    		 [
    		    {title:"图标",type:"uploadimg",name:"picUrl",width:"200"},
    		    {title:"数量",type:"text",name:"cnt",width:150,datatype:"Number",msg:"请输入格式正确的数量！"}
    		 ],
    		 [
                {title:"单价",type:"text",name:"sigleCashMoney",width:150,datatype:"Money",msg:"请输入格式正确的单价！"},
                {title:"总额",type:"text",name:"cashMoney",width:"150",datatype:"Money",msg:"请输入格式正确的总额！"}
             ],
             [
                {title:"有效时间",name:"effectTime",type:"datetime",width:150,datatype:"Date",msg:"请输入格式正确的有效时间！"},
                {title:"",name:"",type:"text",width:150}
             ],
             [
                {title:"备注",type:"text",name:"note",width:826,colspan:3}
             ]
             ],
		toolbar:{align:'right',buttons:[
		                 			  {
		                 			    	 id:'save',
		                 			    	 title:'保存',
		                 			    	 handlers:{
		                 			    		 click: function(){
		                 			    			 if(!Validator.Validate(document.getElementById('formedit'),0)){
		                 			    			    return;
		                 			    			 }
		                 			    			 form.save(function(ret) {
                                                         if (ret == -1) {
                                                             layer.alert("数据保存失败，请重试！");
                                                         } else {
                                                             layer.msg("数据已保存！");
                                                         }
                                                     });
		                 			    		 }
		                 			    	 }
		                 			     }
		                 			 ]}
    }

	var form;
    $(document).ready(function(){
    	form = new FormView("formview",formSetting);
    	form.init();

    	var html="<input uiType='radio' type='radio' name='isSend' id='rdoIsSend' value='1' /><label for='rdoIsSend'>是否发送提现消息</label>";
        $("tr[rowindex=5]").children().eq(3).html(html);

    	var id='<%=request.getParameter("id")%>';
    	if(id!=null&&id!=""){
    	   form.loadData(id, "QhNoviceTask");
    	}

		ajustHeight();
    });

    var $$ = function(func){
        if (document.addEventListener) {
            window.addEventListener("load", func, false);
        }
        else if (document.attachEvent) {
            window.attachEvent("onload", func);
        }
    }
    $$(function(){

    });
    //-->
</SCRIPT>
</head>

<body>
<div id="formview0" class="rbox1"></div>
<div id="formview" class="rbox1"></div>
<div id="list" class="rbox2"></div>
<div id="fmUploadImg" style="display:none">
    <form method="post" enctype="multipart/form-data" name="form1" id="form1">
        <table>
            <tr>
                <td style="padding:20px 0 0 20px;">
                    <input type="file" name="userfile" id="inputImg" />
                </td>
            </tr>
        </table>
    </form>
</div>
<script type="text/javascript" src="<%=path %>/static/js/underscore.js"></script>
<script type='text/javascript' src='<%=path %>/static/My97DatePicker/WdatePicker.js'></script>
<script type='text/javascript' src='<%=path %>/dwr/engine.js'></script>
<script type='text/javascript' src='<%=path %>/dwr/util.js'></script>
<script type='text/javascript' src='<%=path %>/dwr/interface/BaseDwr.js'></script>
</body>
</html>